<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../static/back_management/css/jurisdiction.css">
    <script type="text/javascript" src="../../static/public_file/js/ModalBox.js"></script>
    <title>Title</title>
    <style>
        body, html {
            padding: 0px;
            margin: 0px;
            width: 100%;
            height: 100%;
        }
        table {
            border-collapse: collapse;
            border-spacing: 0;
        }
        tr {
            height: 35px;
        }

        th {
            text-align: center;
        }
        .top_tag {
            border-bottom: #01AAED solid 2px;
            color: #01AAED;
        }

        .tab_top {
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            display: inline-block;
            cursor: pointer;
        }
        /*tbody td {*/
        /*    overflow: hidden;*/
        /*    white-space: nowrap;*/
        /*    text-overflow: ellipsis;*/
        /*}*/

        .file {
            position: relative;
            display: inline-block;
            background: #D0EEFF;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 4px 12px;
            overflow: hidden;
            color: #1E88C7;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
        }

        .file input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
        }

        .a_tag_cla{
            display: block;
            /*超出隐藏*/
            overflow: hidden;
            /*禁止换行*/
            white-space: nowrap;
            /*超出用省略号代替*/
            text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }

        .file:hover {
            background: #AADFFD;
            border-color: #78C3F3;
            color: #004974;
            text-decoration: none;
        }
        .time-adress-td {
            border: #cfcfcf solid 0.5px;width: 90%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;outline: none;
        }
        .time_input {
            text-align: left;width: 90%;border: none;font-size: 8px;outline: none;
        }
        #loading { background: #fff url(../../static/public_file/images/jiazai.gif) no-repeat scroll center center; height: 100%; width: 100%; background-size: 10%; position: fixed; margin-top: 0px; top: 0px; left: 0px; bottom: 0px; overflow: hidden !important; right: 0px; z-index: 999999;background-color: rgba(255, 255, 255, 0.08);}

    </style>
</head>
<body>
    <div id="loading">
        <div id="loading-center">
        </div>
    </div>

    <div style="width: 100%;height: 40px;background: white;border-bottom: #cfcfcf solid 0.5px;line-height: 40px;color: black;">
        <div id="DW_tag" class="tab_top top_tag" onclick="change_mind('DW')">
            申请详情
        </div>
        <div id="LH_tag" class="tab_top" onclick="change_mind('LH')">
            附件
        </div>
        <div id="lct_tag" class="tab_top" onclick="change_mind('lct')">
            流程图
        </div>
        <button onclick="ExportCar()" style="float: right;width: 100px;height: 30px;line-height: 30px;margin-top: 5px;border-radius: 3px;border: #1E90FF solid 0.5px;background-color: #1E90FF;color: white;cursor: pointer;margin-right: 15px;">提交</button>

        <div style="width: 110px;float: right;text-align: center;height: 40px;">
            <button style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;"><a href="javascript:history.go(-1)" style="color: white;">返回</a></button>
        </div>
    </div>

    <div id="DW" style="width: 100%;height: 95%;background: white;overflow: auto;"  >
        <div style="width: 100%;height: 93%;overflow: auto;">
            <div id="menu_from" style="width: 100%;height: 100%;color: #2C3E50;display: inline-block;vertical-align: top;background: white;">
            <div style="width: 90%;height: 90%;display: inline-block;vertical-align: center;margin-left: 5%;margin-top: 20px;">
                <div style="width: 100%;">
                    <table style="width: 100%;margin-top: 20px;">
                        <tr style="width: 100%;">
                            <td colspan="4" style="width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;border: #cfcfcf solid 1px;text-align: center;">
                                <h3 id="form_name" style="letter-spacing: 8px;">招标采购项目审批表</h3>
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="4" style="width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border: #cfcfcf solid 1px;border-top: none;">基本信息</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 2px;padding-right: 1%;">
                                申&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人
                            </td>
                            <td id="apply_user" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;">{{ obj.apply_user.real_name }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                联系电话
                            </td>
                            <td id="Telephone" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;">{{ obj.apply_user.mobile }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                申&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;部&nbsp;&nbsp;&nbsp;门
                            </td>
                            <td id="department" style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;">{{ obj.company.name }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                申请时间
                            </td>
                            <td id="applicat_time" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;">{{ obj.create_time|date:'Y-m-d' }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="4" style="width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border: #cfcfcf solid 1px;border-top: none;">申请详情</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                项&nbsp;&nbsp;&nbsp;目&nbsp;&nbsp;&nbsp;名&nbsp;&nbsp;&nbsp;称
                            </td>
                            <td id="ApplicationReason" style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;" contenteditable="{{ is_edit }}">{{ obj.ApplicationReason }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                采购类别
                            </td>
                            <td id="" style="width: 35%;border: #cfcfcf solid 0.5px;line-height: 35px;padding-left: 0.5%;">
                                {% if is_edit == 'true' %}
                                    <select name="" id="categories" style="width: 100%;outline: none;height: 100%;border: none;">
                                        <option value="0" {% if obj.categories == '0' %} selected {% endif %}>请选择采购类型</option>
                                        <option value="1" {% if obj.categories == '1' %} selected {% endif %}>工程类</option>
                                        <option value="2" {% if obj.categories == '2' %} selected {% endif %}>货物类</option>
                                        <option value="3" {% if obj.categories == '3' %} selected {% endif %}>服务类</option>
                                    </select>
                                {% else %}
                                    {% if obj.categories == '1' %}
                                        工程类
                                    {% elif obj.categories == '2' %}
                                        货物类
                                    {% else %}
                                        服务类
                                    {% endif %}
                                {% endif %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                预&nbsp;算&nbsp;金&nbsp;额(元)
                            </td>
                            <td id="budget_amount" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;" onblur="financial_format()" contenteditable="{{ is_edit }}">{{ obj.budget_amount }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                经费来源
                            </td>
                            <td style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;">
                                {% if is_edit == 'true' %}
                                    <select name="" id="source" style="width: 100%;height: 100%;outline: none;border: none;">
                                        <option value="0" {% if obj.source == '0' %} selected {% endif %}>请选择经费来源</option>
                                        <option value="1" {% if obj.source == '1' %} selected {% endif %}>单位资金</option>
                                        <option value="2" {% if obj.source == '2' %} selected {% endif %}>财政拨款</option>
                                    </select>
                                {% else %}
                                    {% if obj.source == '1' %}
                                        单位资金
                                    {% else %}
                                        财政拨款
                                    {% endif %}
                                {% endif %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 2.2px;padding-right: 1%;">
                                项&nbsp;目&nbsp;负&nbsp;责&nbsp;人
                            </td>
                            <td id="project_leader" style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;" contenteditable="{{ is_edit }}">{{ obj.project_leader }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                联系电话
                            </td>
                            <td id="telephone" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ obj.telephone }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;padding-right: 1%;">
                                技术咨询联系人
                            </td>
                            <td id="contact_person" style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;" contenteditable="{{ is_edit }}">{{ obj.contact_person }}</td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 1.2px;padding-right: 1%;">
                                联系电话
                            </td>
                            <td id="contact_telephone" style="width: 35%;height: 35px;line-height: 35px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ obj.contact_telephone }}</td>
                        </tr>
                        {% if is_edit == 'true' %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 3.2px;border-bottom: none;padding-right: 1%;">
                                    立项通过会议
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;border-bottom: none;">
                                    <select name="" id="project_meeting" style="width: 100%;height: 100%;border: none;outline: none;">
                                        <option value="0" {% if obj.project_meeting == '0' %} selected {% endif %}>请选择立项会议</option>
                                        <option value="1" {% if obj.project_meeting == '1' %} selected {% endif %}>院长办公会</option>
                                        <option value="2" {% if obj.project_meeting == '2' %} selected {% endif %}>党委会</option>
                                    </select>
                                </td>
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;border-bottom: none;padding-right: 1%;">
                                    纪要编号
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;border-bottom: none;">
                                    〔<input id="minutes_number_year" type="text" style="width: 80px;border: none;outline: none;border-bottom: #999999 solid 1px;text-align: center;height: 25px;" value="{{ obj.minutes_number_year }}">〕<input type="text" id="minutes_number_number" style="height: 25px;text-align: center;width: 80px;border: none;outline: none;border-bottom: #999999 solid 1px;" value="{{ obj.minutes_number_number }}">号第<input type="text" id="topic_number" style="height: 25px;text-align: center;width: 80px;border: none;outline: none;border-bottom: #999999 solid 1px;" value="{{ obj.topic_number }}">个议题
                                </td>
                            </tr>
                        {% else %}
                            {% if obj.procurement %}
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 3.2px;border-bottom: none;padding-right: 1%;">
                                    会议纪要编号
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;border-bottom: none;">
                                    {% if obj.project_meeting == '1' %}
                                        院长办公会〔{{ obj.minutes_number_year }}〕{{ obj.minutes_number_number }}号第{{ obj.topic_number }}个议题
                                    {% else %}
                                        党委会〔{{ obj.minutes_number_year }}〕{{ obj.minutes_number_number }}号第{{ obj.topic_number }}个议题
                                    {% endif %}
                                </td>
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;border-bottom: none;padding-right: 1%;">
                                    采购方式
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;border-bottom: none;">
                                    {% if obj.procurement == '1' %}
                                        公开招标
                                    {% elif obj.procurement == '2' %}
                                        邀请招标
                                    {% elif obj.procurement == '3' %}
                                        竞争性谈判
                                    {% elif obj.procurement == '4' %}
                                        竞争性磋商
                                    {% elif obj.procurement == '5' %}
                                        询价
                                    {% elif obj.procurement == '6' %}
                                        单一来源采购
                                    {% else %}
                                        其他采购方式
                                    {% endif %}
                                </td>
                            {% else %}
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 35px;line-height: 35px;letter-spacing: 3.2px;border-bottom: none;padding-right: 1%;">
                                    会议纪要编号
                                </td>
                                <td colspan="3" style="width: 85%;border: #cfcfcf solid 0.5px;padding-left: 0.5%;line-height: 35px;border-bottom: none;">
                                    {% if obj.project_meeting == '1' %}
                                        院长办公会〔{{ obj.minutes_number_year }}〕{{ obj.minutes_number_number }}号第{{ obj.topic_number }}个议题
                                    {% else %}
                                        党委会〔{{ obj.minutes_number_year }}〕{{ obj.minutes_number_number }}号第{{ obj.topic_number }}个议题
                                    {% endif %}
                                </td>
                            {% endif %}
                        {% endif %}
                    </table>
                </div>
                {% if is_edit == 'true' %}
                    <div style="width: 100%;">
                        <div style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;border-bottom: none;padding-right: 1%;">
                            上传附件
                            <a href="javascript:;" class="file" style="vertical-align: top;margin-top: 5px;float: right;">
                                上传文件
                                <input type="file" name="party_main_body" id="party_main_body"
                                       onchange="upload_accessory('file1', 'party_main', 'party_main_body')">
                            </a>
                        </div>
                        <table style="width: 100%;">
                            <thead>
                            <tr>
                                <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">序号</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    文件名称
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    文件大小
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    上传时间
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    上传人员
                                </td>
                                <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">操作
                                </td>
                            </tr>
                            </thead>
                            <tbody style="overflow: auto;" id="party_main">
                                {% for record in file_list %}
                                    <tr>
                                        <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">{{ forloop.counter }}</td>
                                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_name }}</td>
                                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_size }}</td>
                                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.upload_time }}</td>
                                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.uploader }}</td>
                                        <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;"><a target='_blank' href="{{ record.file_path }}">查看</a> | <a style="color: red;" href='#' onclick='RemoveTr(this, "party_main", {{ record.id }})' >删除</a></td>
                                    </tr>
                                {% endfor %}
                            </tbody>
                        </table>
                    </div>
                {% endif %}
                <table style="width: 100%;">
                    <tr>
                        <td colspan="6"
                            style="width: 90%;height: 40px;margin-left: 5%;line-height: 40px;background-color: #F5F5F5;padding-left: 0.5%;border: #cccccc solid 0.5px;padding-right: 1%;">
                            审批详情
                        </td>
                    </tr>

                    {% if 'one' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                立项科室负责人
                            </td>
                            <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'one' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'two' in audit_dic %}
                        <tr id="fgld_tr" style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2.8px;">
                                项目分管领导
                            </td>
                            <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'two' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'three' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                招标采购办公室
                            </td>
                            <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'three' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'four' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                招标办分管领导
                            </td>
                            <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'four' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'five' in flow_dict %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2.5px;">
                                院&nbsp;领&nbsp;导&nbsp;审&nbsp;批
                            </td>
                            <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'five' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}
                </table>
            </div>
        </div>
        </div>
    </div>

    <div id="LH" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">附件</div>
            <div id="yt_zhengwen" style="width: 100%;">
                {% for item in file_list %}
                    <div><a href="#" class="a_tag_cla" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                {% endfor %}
            </div>
        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in file_path or 'JPG' in file_path or 'JPEG' in file_path or 'jpeg' in file_path or 'PNG' in file_path or 'png' in file_path %}
                <img src="{{ file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>

    <div id="lct" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="width: 100%;height: 40%;text-align: center;margin: 20% auto;">
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    ({{ obj.apply_user.real_name }})<br>
                    发起人
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    start
                </div>
            </div>

            {% if 'one' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'one' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                立项科室负责人
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'two' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'two' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                项目分管领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'three' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'three' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                招标采购办公室
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'four' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'four' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                招标办分管领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'five' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'five' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                院领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            <div style="display: inline-block;border: #0d8ddb solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    <span style="visibility: hidden;">({{ obj.apply_user.real_name }})</span><br>
                    结束
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    ending
                </div>
            </div>
        </div>
    </div>

    <div id="del_adjunct"
         style="z-index: 1000;position: fixed;background-color: rgba(36, 36, 36, 0.5);width: 100%;height: 100%;top: 0;left: 0;right: 0;bottom: 0;display: none;">
        <div style="top: 50%;left: 50%;width: 400px;height: 150px;background: white;transform:translate(-50%,-50%);border: #dfdfdf solid 1px;position: absolute;border-radius: 4px;">
            <div style="width: 100%;height: 100px;text-align: center;line-height: 100px;">请查看附件，删除无用的附件！</div>
            <hr>
            <div style="width: 100%;height: 50px;text-align: right;padding-right: 5%;">
                <button onclick="del_adjunct_button()"
                        style="width: 50px;height: 30px;line-height: 30px;margin-top: 10px;background: #00a0e9;color: white;border-radius: 4px;border: #00a0e9 solid 1px;">
                    确认
                </button>
            </div>
        </div>
    </div>

    <script src="../../static/system_setup/creat_from/js/jquery-1.10.2.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
        }
        var uuid = "{{ obj.fj_number }}"

        function change_mind(ele_id) {
            if (ele_id === "DW") {
                document.getElementById("DW").style.display = "inline-block";
                document.getElementById("DW_tag").className = "tab_top top_tag";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            } else if (ele_id === "LH") {
                document.getElementById("LH").style.display = "inline-block";
                document.getElementById("LH_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            }else {
                document.getElementById("lct").style.display = "inline-block";
                document.getElementById("lct_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
            }
        }

        // 修改
        function ExportCar() {
            var form = new FormData();
            var ApplicationReason = document.getElementById("ApplicationReason").innerText;         // 项目名称
            var categories = document.getElementById("categories").value;                                   // 采购类别
            var budget_amount = document.getElementById("budget_amount").innerText;             // 预算金额
            var source = document.getElementById("source").value;                                   // 经费来源
            var project_leader = document.getElementById("project_leader").innerText;           //项目负责人
            var telephone = document.getElementById("telephone").innerText;                         //联系电话
            var contact_person = document.getElementById("contact_person").innerText;               // 技术咨询联系人
            var contact_telephone = document.getElementById("contact_telephone").innerText;                 // 技术咨询联系电话
            var project_meeting = document.getElementById("project_meeting").value;                                   // 立项会议
            var minutes_number_year = document.getElementById("minutes_number_year").value;                                   // 立项会议年份
            var minutes_number_number = document.getElementById("minutes_number_number").value;                                   // 立项会议编号
            var topic_number = document.getElementById("topic_number").value;                                               // 第几个议题

            var administrative_table = document.getElementById('party_main');
            if (!administrative_table.children.length) {
                alert("请上传附件！");
                return false
            }
            if (!ApplicationReason) {
                alert("请输入项目名称！");
                return false
            }
            if (categories === '0') {
                alert("请选择采购类别！");
                return false
            }
            if (!budget_amount) {
                alert("请输入预算金额！");
                return false
            }
            if (source === '0') {
                alert("请选择经费来源！");
                return false
            }
            if (!project_leader) {
                alert("请输入项目负责人！");
                return false
            }
            if (!contact_person) {
                alert("请输入技术咨询联系人！");
                return false
            }
            if (!minutes_number_year) {
                alert("请输入立项会议年份！");
                return false
            }
            if (!minutes_number_number) {
                alert("请输入立项会议编号！");
                return false
            }
            if (!topic_number) {
                alert("请输入第几个议题！");
                return false
            }

            form.append('id', '{{ obj.id }}');
            form.append('ApplicationReason', ApplicationReason);
            form.append('categories', categories);
            form.append('budget_amount', budget_amount);
            form.append('source', source);
            form.append('project_leader', project_leader);
            form.append('telephone', telephone);
            form.append('contact_person', contact_person);
            form.append('contact_telephone', contact_telephone);
            form.append('project_meeting', project_meeting);
            form.append('minutes_number_year', minutes_number_year);
            form.append('minutes_number_number', minutes_number_number);
            form.append('topic_number', topic_number);
            form.append('admin', 'true');
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/logistics/BiddingProcurementProjectIndex.html", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("修改成功");
                            window.location = "BiddingProcurementProjectList.html";
                        } else {
                            alert(JsonDate['message']);
                            document.getElementById("loading").style.display = "none";
                        }
                    }
                }
            };
        }

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        // 删除附件
        function RemoveTr(_this, tbody_id, wj_id) {
            var table = document.getElementById(tbody_id);
            var trNode = $(_this).parent().parent();
            trNode.remove();

            for (var i=0; i<table.children.length; i++){
                table.children[i].children[0].innerHTML=i+1;
            }

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/delete_attachments_view", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id="+String(wj_id));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert("删除成功！")
                    }
                }
            };
        }

        // 上传附件
        function upload_accessory(file_type, tbody_id, accessory_type) {
            document.getElementById("loading").style.display = "inline-block";
            var form = new FormData();
            var files = document.getElementById(accessory_type).files[0];
            form.append(file_type, files);
            form.append('number', "{{ obj.fj_number }}")
            form.append('source', 'yysq');

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/topics_attachments_upload", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        creat_table(JsonDate, tbody_id)
                    }
                }
            };
        }

        // 创建附件列表
        function creat_table(JsonData, tbody_id) {
            var t_table = document.getElementById(tbody_id);
            var local_host = window.location.host;
            if (Array.isArray(JsonData["pdf_path"])) {
                for (var i = 0; i < JsonData["pdf_path"].length; i++) {
                    var tr = document.createElement("tr");var td1 = document.createElement("td");var td2 = document.createElement("td");var td3 = document.createElement("td");var td4 = document.createElement("td");var td5 = document.createElement("td");var td6 = document.createElement("td");
                    td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                    td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                    td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                    td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                    td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                    td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"][i]["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["pdf_path"][i]["id"] + "\")'>删除</a>";
                    td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                    tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);
                    t_table.appendChild(tr);
                }
                if (JsonData["pdf_path"].length > 1) {
                    document.getElementById("del_adjunct").style.display = 'block';
                }
            } else {
                tr = document.createElement("tr");td1 = document.createElement("td");td2 = document.createElement("td");td3 = document.createElement("td");td4 = document.createElement("td");td5 = document.createElement("td");td6 = document.createElement("td");
                td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["id"] + "\")'>删除</a>";
                td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);
                t_table.appendChild(tr);
            }
        }

        function formatMonenyNumber(number, toFixed = 2) {
            let str = [];
            if (!number) return 0
            if (typeof number === "number") number = String(number)
            let tempNumber = number.split('.');
            number = tempNumber[0]
            if (number.length <= 3) {
                if (tempNumber[1]) {
                    number += '.' + tempNumber[1].slice(0, toFixed);
                }
                return number
            }
            number.split('').reverse().forEach((item, index) => {
                if (index !== 0 && index % 3 === 0) {
                    str.push(',', item)
                } else {
                    str.push(item)
                }
            })
            number = str.reverse().join('')
            if (tempNumber[1]) {
                var decimils = tempNumber[1].slice(0, toFixed);
                if (decimils.length === 1){
                    decimils = decimils + "0";
                }
                number += '.' + decimils;
            }else {
                 number += '.00'
            }
            return number;
        }

        function financial_format() {
            document.getElementById('budget_amount').innerText = formatMonenyNumber(document.getElementById('budget_amount').innerText.replace(',', '').replace(',', '').replace(',', ''))
        }
    </script>
</body>
</html>